package com.xinlianshiye.im

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.domain.EntityScan
import org.springframework.data.jpa.repository.config.EnableJpaRepositories
import org.springframework.scheduling.annotation.EnableAsync
import org.springframework.scheduling.annotation.EnableScheduling
import java.util.*

@SpringBootApplication(scanBasePackages = ["com.xinlianshiye.clouds.common", "com.xinlianshiye.im"])
@EnableJpaRepositories(basePackages = ["com.xinlianshiye.im.dao"])
@EntityScan(basePackages = ["com.xinlianshiye.im.bean"])
@EnableScheduling
@EnableAsync
@EnableDubbo(scanBasePackages = ["com.xinlianshiye.im.service"])
class IMApplication {
    companion object {
        @JvmStatic
        fun main(args: Array<String>) {
            val timeZone = TimeZone.getTimeZone("GMT+8")
            TimeZone.setDefault(timeZone)
            SpringApplication.run(IMApplication::class.java, *args)
        }
    }
}
